<%-- 
    Document   : toggleComplete
    Created on : 17.10.2010, 16:07:44
    Author     : nico
--%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="u" uri="http://nixis.de/jsp/tags/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<c:choose>
    <c:when test="${it.done}">
        <p>Task marked as done.</p>
        <p>It would be great if you could give us some additional comments on the task</p>

        <form method="post" class="ajax" action="<u:url value="/todo/${it.todo.id}/finalComment"/>">
            <fieldset>
                <label>Time it took it to execute</label>
                <input type="text" name="timeInvested" /> (in hours)
            </fieldset>
            <fieldset>
                <label>Additional comments</label>
                <textarea name="comment" cols="30" rows="5"></textarea>
            </fieldset>
            <fieldset>
                <input type="submit" value="submit"/>
            </fieldset>
        </form>
        <script type="text/javascript">
            $("#toggle-completed-dialog").dialog({
                title: "Task completed",
                width: 320
            }).dialog("open");
        </script>
    </c:when>
    <c:otherwise>
        Done status unmarked.
        <c:set var="title" value="Work to do"/>
    </c:otherwise>
</c:choose>
